
<!DOCTYPE html>
<html>

<head>

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="shortcut icon" href="favicon.ico"> <link href="__PUBLIC__/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
  <link href="__PUBLIC__/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
  <link href="__PUBLIC__/css/animate.min.css" rel="stylesheet">
  <link href="__PUBLIC__/css/style.min.css?v=4.1.0" rel="stylesheet">
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content">
  <div class="row">
    <div class="col-12">
      <div class="ibox float-e-margins">
        <div class="ibox-content mailbox-content">
          <div class="file-manager">
            <a class="btn btn-block btn-primary compose-mail" href="#">写信(未开发)</a>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="row">
    <div class="col-sm-12 animated fadeInRight" id="MailBody">
      <div class="mail-box-header">
        <div class="pull-right tooltip-demo">
          <a href="" class="btn btn-white btn-sm" data-toggle="tooltip" data-placement="top" title="回复"><i class="fa fa-reply"></i> 回复</a>
        </div>
        <h2>
          查看邮件
        </h2>
        <div class="mail-tools tooltip-demo m-t-md">
          <h3>
            <span class="font-noraml">主题： </span>{{Mail.title}}
          </h3>
          <h5>
            <span class="pull-right font-noraml">{{Mail.time}}</span>
            <span class="font-noraml">发件人： </span>{{Mail.fromUser}}
          </h5>
        </div>
      </div>
      <div class="mail-box" >
        <div class="mail-body" v-html="Mail.content">
        </div>
        <div class="mail-body text-right tooltip-demo">
          <a class="btn btn-sm btn-white" href=""><i class="fa fa-arrow-right"></i> 下一封</a>
        </div>
        <div class="clearfix"></div>


      </div>
    </div>
  </div>
</div>


<!-- 全局js -->
<script src="__PUBLIC__/js/vue.js"></script>
<script src="__PUBLIC__/js/vue-resource.js"></script>
<script>
  function getQueryVariable(variable)
  {
    var query = window.location.search.substring(1);
    var vars = query.split("&");
    for (var i=0;i<vars.length;i++) {
      var pair = vars[i].split("=");
      if(pair[0] === variable){return pair[1];}
    }
    return false;
  }

  var MailBody=new Vue({
    el:"#MailBody",
    data:{
      Mail:{}
    },
    created:function () {
      var Id=getQueryVariable('Id');
      data=this.$http.post('MailDetailJson',{Id:Id}).then(
        (data)=>{
          MailBody.Mail=data.body;
        },
        (err)=>{
          console.log(err);
        }
      )
    }
  })
</script>
</body>
</html>
